<template>
  <div>
    <ul>
      <li class="recLi" v-for="rec of recs" @click="getDetails(rec)">
        <img class="headImg" :src="rec.headpic"/>
        <div class="infoArea">
          <p class="info_name">{{rec.nickname}}</p>
          <p>
            <span class="info_more">年龄：{{rec.age}}</span>
            <span class="info_more">体重：{{rec.weight}}</span>
            <span class="info_more">身高：{{rec.height}}</span>
          </p>
          <p class="info_intro">简介： {{rec.intro}}</p>
        </div>
        <el-button @click="contact(rec)">约我吧</el-button>
      </li>
    </ul>
  </div>
</template>
<script>
  export default{
    name: '',
    data(){
      return {
        recs:[
          {
            headpic:'http://photo16.zastatic.com/images/photo/26693/106768157/1503930309865_2.png',
            nickname:'诺兰',
            age:'23',
            weight:'105',
            height:'180',
            intro:'hahahahahahahahahahahahahahahahahahahahahahahahahahaha',
          },
          {
            headpic:'http://photo16.zastatic.com/images/photo/26693/106768157/1503930309865_2.png',
            nickname:'诺兰',
            age:'23',
            weight:'105',
            height:'180',
            intro:'hahahahahahahahaha',
          },
          {
            headpic:'http://photo16.zastatic.com/images/photo/26693/106768157/1503930309865_2.png',
            nickname:'诺兰',
            age:'23',
            weight:'105',
            height:'180',
            intro:'hahahahahahahahaha',
          },
          {
            headpic:'http://photo16.zastatic.com/images/photo/26693/106768157/1503930309865_2.png',
            nickname:'诺兰',
            age:'23',
            weight:'105',
            height:'180',
            intro:'hahahahahahahahaha',
          },
        ],
      }
    },
    methods: {
      getDetails(){

      },
      contact(){

      }
    },
  }
</script>
<style scoped>
  .recLi{
    display: flex;
    align-items: center;
    margin: 15px;
    padding: 5px;
    border: 1px solid #80808057;
    border-radius: 0.8em;
  }
  .headImg{
    width: 6em;
    height: 6em;
    padding: 0.5em;
    margin: 0.5em;
  }
  .infoArea{
    display: inline-block;
    margin-left: 0.5em;
    margin-right: 4em;
  }
  .info_name{
    font-size: 1.2em;
    font-weight: 500;
    color: #f85377;
  }
  .info_more{
    margin-right: 1.5em;
  }
  .info_intro{
    width: 20em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
</style>